package com.lightsaber.cut.entity;

public class Component implements Comparable<Component> {

    private Integer length;
    private Integer sequence;
    private boolean reserve;
    private Integer randomFlag;

    public boolean isReserve() {

        return reserve;
    }

    public void setReserve(boolean reserve) {

        this.reserve = reserve;
    }

    public Integer getLength() {

        return length;
    }

    public Integer getSequence() {
        return sequence;
    }

    public void setSequence(Integer sequence) {
        this.sequence = sequence;
    }

    public void setLength(Integer length) {

        this.length = length;
    }

    @Override
    public String toString() {
        return "Component [length=" + length + "]";
    }

    @Override
    public int compareTo(Component o) {
        return o.length.compareTo(this.length);
    }

    public Integer getRandomFlag() {
        return randomFlag;
    }

    public void setRandomFlag(Integer randomFlag) {
        this.randomFlag = randomFlag;
    }
}
